<?php
switch ($_REQUEST['sAction'])
{
	case 'note-delete':
		$iResult = NoteHandler::delNote($_REQUEST['iNoteID'], $_REQUEST['iMissionID']);
		if ($iResult == 1) {
			header('Location: index.php?sView=job-view');
			exit();
		}
		break;
	case 'note-change':
		$iResult = NoteHandler::changeNote($_REQUEST['iNoteID'], $_REQUEST['iMissionID'], $_REQUEST['sBody'], $_REQUEST['bUseHTML']);
		if ($iResult == 1) {
			header('Location: index.php?sView=job-view');
			exit();
		}
		break;
	case 'note-add':
		$iResult = NoteHandler::addNote($_SESSION['iJobID'], $_REQUEST['iMissionID'], $_REQUEST['sBody'], $_SESSION['rid'], thisSecond(), $_REQUEST['bUseHTML']);
		if ($iResult > 0) {
			header('Location: index.php?sView=job-view');
			exit();
		}
		break;
}
?>
